<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <!--[if lt IE 9]>
    <script type="text/javascript" src="lib/html5.js"></script>
    <script type="text/javascript" src="lib/respond.min.js"></script>
    <script type="text/javascript" src="lib/PIE_IE678.js"></script>
    <![endif]-->
    <link href="__PUBLIC__/css/H-ui.min.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/css/H-ui.admin.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/css/style.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/lib/icheck/icheck.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/lib/Hui-iconfont/1.0.6/iconfont.css" rel="stylesheet" type="text/css"/>
    <link href="Tpl/Service/common/center/getCustomer.css" rel="stylesheet" type="text/css"/>
    <!--[if IE 6]>
    <script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js"></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <title>用户详情</title>
</head>
<body>
<div class="container">
    <div class="col-6 lingVer mt-10 mb-10">
        <div class="row pt-10 pb-20">
            <form action="" method="post" class="form form-horizontal sugForm" id="form-room-add" autocomplete="off">
                <div class="row cl">
                    <label class="form-label col-3">客户编号：</label>
                    <div class="formControls col-8 input_h">
                                <span class="select-box">
                                  {$data.customer_no}
                                </span>
                    </div>
                    <div class="col-1"></div>
                </div>
                <div class="row cl">
                    <label class="form-label col-3">姓名：</label>
                    <div class="formControls col-8 input_h">
                                <span class="select-box">
                                  {$data.name}
                                </span>
                    </div>
                    <div class="col-1"></div>
                </div>
                <div class="row cl">
                    <label class="form-label col-3">主要号码：</label>
                    <div class="formControls col-8 input_h">
                                <span class="select-box">
                                  {$data.tel}
                                </span>
                    </div>
                    <div class="col-1"></div>
                </div>
                <div class="row cl">
                    <label class="form-label col-3">其他号码：</label>
                    <div class="formControls col-8 input_h">
                                <span class="select-box">
                                  {$data.contact}
                                </span>
                    </div>
                    <div class="col-1"></div>
                </div>
                <div class="row cl">
                    <label class="form-label col-3">性别：</label>
                    <div class="formControls col-8">
                                <span class="select-box">
                                    <if condition='$data["sex"] eq "M"'>
                                    男
                                    <else/>
                                    女
                                    </if>
                                </span>
                    </div>
                    <div class="col-1"></div>
                </div>
                <div class="row cl">
                    <label class="form-label col-3">客户分组：</label>
                    <div class="formControls col-8 input_h">
                                <span class="select-box">
                                 {$ugroup[$data["ugroup"]].text}
                                </span>
                    </div>
                    <div class="col-1"></div>
                </div>
                <div class="row cl">
                    <label class="form-label col-3">家庭住址：</label>
                    <div class="formControls col-8">
                                <volist name="data['families']" id="vo">
                                    <span class="select-box customerAddress">
                                    {$vo.address}
                                    </span>
                                </volist>
                    </div>
                    <div class="col-1"></div>
                </div>
            </form>
        </div>
    </div>
   <div class="col-6 mt-10 massage_w back">
                <p class="pl-20">呼入记录:</p>
                <div class="wordRecord">
                    <p class="">暂无呼入记录</p>
       </div>
                
  </div>
</div>
<script type="text/javascript" src="__PUBLIC__/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/lib/icheck/jquery.icheck.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/lib/layer/2.1/layer.js"></script>
<script type="text/javascript" src="__PUBLIC__/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/H-ui.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/H-ui.admin.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/getUrl.js"></script>
<script type="text/javascript" src="__PUBLIC__/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<!--<script type="text/javascript" src="Tpl/Service/common/order/create.js"></script>-->
<script type="text/javascript" src="__PUBLIC__/js/autocomplete_service.js"></script>
<script type="text/javascript">
    // 全局
    var info = {
        id: 0,//业主id
        index: 0,//下拉索引
        control: 'Room',//控制器
        action: 'autoComplete',//自动完成方法
        formName: '#searchName'//表名
    };
    $(function () {
        work.init();

    });
    
    var work={
	/*·····························初始化························*/
	init:function(){
		this.eventListen();
		this.getDict();
	},
	/*·····························事件监听························*/
	eventListen:function(){
		// 按钮颜色切换和取值放入隐藏域
		$(document).on("click","#buttonGroup button",function(){
			$("#Bcate").attr("value",$(this).text());
			$("#buttonGroup button").removeClass("btn-primary");
			$(this).addClass("btn-primary");
			var signId="#Scate";
			var type=$(this).attr("type");
			work.getDict(signId,type);
		});
		//表单提交
		$(document).on("click","#formSub",function(){
			work.formsub();
		});
	},
	/*·····························功能性函数························*/
	// iframe页面弹窗
	layerOpen:function(title,url){
		layer.open({
			type: 2,
			area: ['800px', '600px'],
			fix: false, //不固定
			maxmin: true,
			shade:0.4,
			title: title,
			content:url
		});
	},
	getDict:function(signId,type){
		var signId=(signId)?signId:"#Scate";
		var type=(type)?type:"maintain1";
		$.post("/index.php?m=Admin&c=Dict&a=getdict",{type:type},function(data){
				if(data){
					var str="";
					for(x in data){
						str+='<option value="'+data[x]['text']+'">'+data[x]['text']+'</option>';
					}
					$(signId).empty();
					$(signId).append(str);
				}else{
					$(signId).empty();
				}
		});
	},
	/*·····························插件初始化························*/
	formsub:function(){
	        $("#form-customer-add").ajaxSubmit({
	        type:'POST',
	        url:'/index.php?m=Service&c=Order&a=send',
	        success:function(data){
	          	// alert();
	        	if(data.stat==1){
	              layer.msg("添加成功");
	              var index = parent.layer.getFrameIndex(window.name);
	              setTimeout(function(){
	                   parent.layer.close(index);
	              },1000);
	              parent.location.reload();
	            	window.location.href="/index.php?m=Service&c=Center&a=index&tel="+info.tel;
	          }else{
	            layer.msg(data.msg);
	          }
	          }
	        });
	}
}
</script>
</body>
</html>